package com.wesley.controller;

import com.wesley.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * created by wei xin on 2020/3/3 0003
 */
@Controller
@RequestMapping("/server2")
public class TestServer2Controller {

    @Autowired
    private AdminService adminService;


    @GetMapping("/test2")
    @ResponseBody
    public void test2() {
        adminService.saveAdmin();
    }


    @GetMapping("/showMsg")
    @ResponseBody
    public Map showMsg() {
        System.out.println("hello...server2");
        Map map = new HashMap();
        map.put("msg","111");
        return map;
    }
}
